program Pin;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  i, n, n0: integer;
  x, y, piX, t: real;
  fout: textfile;
begin
  randomize;
  n:=0;
  n0:=0;
  Assignfile (fout, 'output.txt');
  rewrite (fout);
  for i:= 1 to 1000000000 do
  begin
    x:= random*2;
    y:= random*2;
    if ((x-1)*(x-1)+(y-1)*(y-1) <= 1) then
      n0:=n0+1;
    n:=n+1;
    if (i mod 100000 = 0) then
    begin
    
      piX:= n0/n*4;
      t:= pi-piX;
      Writeln (fout, t:0:10);
    end;
  end;
  Closefile (fout);
end.
